QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Point Lights

Labels

ASCII
PointLight
Binary
pntl ( = 0x706E746C )

Data Format

Point3D             location
Attenuation         attenuation
Boolean             castsShadows
location
The location of the source of the point light.
attenuation
This structure determines the amount that the intensity of the light diminishes over distance. See the section "Attenuation and Fall-Off Values" for a description of this structure.
castsShadows
A value of True specifies that objects illuminated by the light are to cast shadows; a value of False specifies that objects illuminated by the light are not to cast shadows.

Data Size

20

Description

A point light is a light that emits rays in all directions from a specific point source. A point light may suffer attenuation over distance and may cast shadows.

Some style objects also specify whether or not objects in a scene shall receive shadows. However, objects in the scope of a receive shadows style set to False do not receive shadows, regardless of whether they are also appropriately situated to receive shadows from a light set to cast shadows.

Parent Hierarchy

Shared, shape, light.

Parent Objects

None.

Child Objects

Light data (optional). If no child object is specified, the light should have the properties specified in the default setting of a light data object.

Example

BeginGroup ( DisplayGroup ( ) )
    Triangle ( ... )
    Box ( ... )
    Container (
        PointLight (
            -10, 1, -1                  # location
            1 0 1                       # attenuation
            True                        # casts shadows
        )
        LightData ( ... )
    )
EndGroup ( )

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |